from core.info_bar import InfoBar

msg = {
    '1': 'group_info',
    '2': 'host_info',
}

chenfei = InfoBar()

while True:
    print('1. 分组：执行命命/发送文件')
    print('2. 主机：执行命令/发送文件')
    print('0. exit')
    choice = input('please input your choice：')
    if choice in msg.keys():
        if hasattr(chenfei, msg[choice]):
            func = getattr(chenfei, msg[choice])
            func()
    else:
        exit(1)